package org.gurms.dao.po.system;

import java.io.Serializable;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="sys_dict")
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SysDict implements Serializable {
	private String dictvalue;
	private String remark;

	private SysDictPK id = new SysDictPK();
	
	@EmbeddedId
	public SysDictPK getId() {
		return id;
	}

	public void setId(SysDictPK id) {
		this.id = id;
	}

	public String getDictvalue() {
		return dictvalue;
	}

	public void setDictvalue(String dictvalue) {
		this.dictvalue = dictvalue;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public boolean equals(Object o){
		if(o == null || !(o instanceof SysDict)){
			return false;
		}else{
			SysDict dict = (SysDict)o;
			if(dict.getId() == null){
				return false;
			}else{
				return dict.getId().equals(id);
			}
		}
	}
	
	public int hashCode(){
		return id.hashCode();
	}
}
